package com.example.demo.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String sayHello() {
        return "第一个Spring Boot程序!";
    }

    @PostMapping("/add")
    public String addUser(String username, String password) {
        return "用户添加成功!"+username+"--"+password;
    }

}

